<?php $this->headTitle('Quản lý người dùng - Sửa', 'append'); ?>
<div class="grid grid_7">
    <div class="box-header">
    	Sửa thông tin 
     </div>
    <div class="box adminformlist">
    	<?php
       	    if($this->mess !='')
            	echo '<p class="error">'.$this->mess.'</p>';
            echo $this->form;
        ?>
        <?php  if(count($this->roles_list) > 0){ ?>
        	<script language="JavaScript" type="text/javascript">
    	  		$("form > dl.zend_form > dd#password-element").after('<div id="role"><dt><label class="optional" style="float:left;">Quyền Hạn</label></dt></div>');
    		</script>
    
    	    <?php foreach($this->roles_list as $role){ ?>
    
    		<script language="JavaScript" type="text/javascript">
    	  		$("form > dl.zend_form > div#role").append('<div style="margin:10px"><div><input type="hidden" value="<?php echo $role->id ?>" name="userRole[]"><input text="text" readonly="true" name = "role[]"value="<?php echo $role->roleName; ?>" /><a style="cursor:pointer;" class="del" title="xóa" onclick="del(this);"><img src="image/icons/small/icon_delete.png" /></a>&nbsp;</div></div>');
    
    			function del(obj){
    				$(obj).parent().remove();
    
    			}
    		</script>
       <?php  
                }
            } 
       ?>
    
    </div>
</div>
<div class="grid grid_2">
    <div class="box-header">Hướng dẫn</div>
</div>
